geneSets <- list(
gs1 = paste("gene",1:20,sep=""),
gs2 = paste("gene",50:60,sep=""),
gs3 = paste("gene",90:92,sep=""),
gs4 = paste("gene",55:65,sep="")
)
newGeneSets1 <- filterGeneSets(
geneSets = geneSets,
includedGenes = c("gene55","gene60"))
newGeneSets2 <- filterGeneSets(
geneSets = geneSets,
includedGenes = c("gene1","gene55","gene20","gene100"),
minIntersectSize = 2)
examplePathway <- c("gene1","gene2","gene3","gene4")
pathwayAdjMatrix <- matrix(0,100,100)
rownames(pathwayAdjMatrix) <- paste("gene",1:100,sep="")
colnames(pathwayAdjMatrix) <- paste("gene",1:100,sep="")
# gene1 interacts with gene2 and gene3
# -> step 1 if gene1 is starting point
pathwayAdjMatrix[1,2:3] <- 1
pathwayAdjMatrix[2:3,1] <- 1
# gene3 interacts with gene4
# -> step 2 if gene1 is starting point
pathwayAdjMatrix[3,4] <- 1
pathwayAdjMatrix[4,3] <- 1
newGeneSets3 <- filterGeneSets(
geneSets = geneSets,
includedGenes = "gene1",
adjMatrix = pathwayAdjMatrix,
steps = 2)
Run the code above in your browser using DataLab